package controller;

import java.util.ArrayList;
import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import util.Converter;
import model.ElementoBase;
import model.PacchettoPersonale;
import model.Utente;
import dto.ElementoBaseDTO;
import dto.PacchettoPersonaleDTO;
import dto.UtenteDTO;

/**
 * Session Bean implementation class Personale
 */
@Stateless
public class Personale implements PersonaleInterface {

	@PersistenceContext
    private EntityManager em;
	
	
    /**
     * Default constructor. 
     */

	public Personale() {
	}

	@Override
	public void updatePacchettoPersonale(PacchettoPersonaleDTO pack) {
		em.merge(new PacchettoPersonale(pack));
	}

	@Override
	public void elimina(PacchettoPersonaleDTO pack) {
		PacchettoPersonale remove = em.merge(new PacchettoPersonale(pack));
		em.remove(remove);
		
	}
    

}
